package cn.wolfcode.luowowo.search.service.impl;

import cn.wolfcode.luowowo.search.repository.ITravelSearchRepository;
import cn.wolfcode.luowowo.serach.service.ITravelSearchService;
import cn.wolfcode.luowowo.serach.template.TravelTemplate;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by admin on 2019/8/17.
 */
@Service
public class TravelSearchServiceImpl implements ITravelSearchService {

    @Autowired
    private ITravelSearchRepository repository;

    @Override
    public void saveOrUpdate(TravelTemplate travelTemplate) {
        repository.save(travelTemplate);
    }

    @Override
    public List<TravelTemplate> findByName(String name) {
        return repository.findByDestName(name);
    }
}
